import request from '@/utils/request.js';

// 封装一个获取评论内容的接口
export const cmtList = (params) => {
    return request({
        url: '/v1_0/comments',
        params
    })
}
// 封装一个发表评论的接口
export const cmtIssue = (data) => {
    return request({
        url: '/v1_0/comments',
        method: 'post',
        data
    })
}
// 封装一个对评论点赞或取消点赞的接口
export const liking = (data) => {
    return request({
        url: '/v1_0/comment/likings',
        method: 'post',
        data
    })
}
// 封装一个对文章点赞的接口
export const artLiking = (data) => {
    return request({
        url: '/v1_0/article/likings',
        method: 'post',
        data
    })
}
// 封装一个对文章取消点赞的接口
export const artLiking2 = (id) => {
    return request({
        url: '/v1_0/article/likings/' + id,
        method: 'delete'
    })
}
// 封装一个对文章喜欢的接口
export const artLive = (data) => {
    return request({
        url: '/v1_0/article/dislikes',
        method: 'post',
        data
    })
}
// 封装一个对文章不喜欢的接口
export const artLive2 = (id) => {
    return request({
        url: '/v1_0/article/dislikes/' + id,
        method: 'delete'
    })
}